package com.hry.sunflower.controller;

import com.hry.sunflower.common.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
public class IndexController {

    @GetMapping("page/index")
    public String pageIndex() {
        return "index";
    }


    @RequestMapping("page/model")
    public String pageModel() {
        return "model";
    }





    @RequestMapping("test")
    @ResponseBody
    public ServerResponse testFont() {
        Style style = new Style("#fff","120%","2px");
        IconLabel iconLabel = new IconLabel("终", style);
        iconLabel.setStyle(style);
        List<Double> list4 = new ArrayList<Double>();
        list4.add(113.673888);
        list4.add(34.757464);
        SimpleMarker font = new SimpleMarker(iconLabel,"red", list4);

        Style style1 = new Style("#fff","120%","2px");
        IconLabel iconLabel1 = new IconLabel("起", style1);
        iconLabel.setStyle(style);
        List<Double> list1 = new ArrayList<Double>();
        list1.add(113.665841);
        list1.add(34.752457);
        SimpleMarker font1 = new SimpleMarker(iconLabel1,"green", list1);

        List list = new ArrayList();
        list.add(font);
        list.add(font1);
        return ServerResponse.createBySuccess("成功", list);

    }


    @RequestMapping("page/login")
    public String loginPage() {
        return "login";
    }


}
